# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-python-memcached
_pyname=python-memcached
pkgver=1.61
pkgrel=0
arch="noarch"
pkgdesc="Python interface to memcached"
url="https://pypi.python.org/project/$_pyname"
license="Python-2.0"
depends="
	py3-six
	"
makedepends="
	py3-setuptools
	py3-wheel
	py3-gpep517
	"
checkdepends="
	py3-pytest
	"
options="!check" # Failing testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/linsomniac/python-memcached/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ea66a04129816863d700718ae525838b381aaca6da3a239e3b2ff5cfc92297083a4b66fe0a10c1460f597e066b3d30902cdab1c38999be49b77d745a078d1da2  py3-python-memcached-1.61.tar.gz
"
